<?=View::factory('admin/common/header')?>
<div id="content">
  <div class="breadcrumb">
    <a href="<?=URL::site('admin')?>">管理首页</a>
    &raquo; <a href="<?=URL::site('admin/manager_privilege')?>">权限列表</a>
    &raquo; 编辑权限
  </div>
  <?=View::factory('admin/common/message')?>
  <div class="box">
    <div class="heading">
      <h1><img src="<?=URL::site()?>images/admin/user-group.png" alt="" /> 编辑权限</h1>
      <div class="buttons">
        <input type="button" onclick="$('#form').ajax_post({redirect:'<?=URL::site('admin/manager_privilege')?>'});" class="btn45" value="保存" /> &nbsp;
        <input type="button" onclick="history.back();" class="btn45" value="返回" />
      </div>
    </div>
    <div class="content">
      <form method="post" enctype="multipart/form-data" id="form" onsubmit="return $('#form').ajax_post({redirect:'<?=URL::site('admin/manager_privilege')?>'});">
        <table class="form">
          <tr>
            <td width="120">所属资源 <span class="required">*</span></td>
            <td><select name="res_id">
              <option value="0"></option>
              <? foreach ($resources as $resource) { ?><option value="<?=$resource['res_id']?>" <?=$resource['res_id']==$res_id?'selected':''?>><?=$resource['res_name']?></option><? } ?>
            </select></td>
          </tr>
          <tr>
            <td>权限名称 <span class="required">*</span></td>
            <td><input type="text" size="30"  maxlength="50" name="priv_name" value="<?=$priv_name?>" /></td>
          </tr>
          <tr>
            <td>权限标识 <span class="required">*</span></td>
            <td><input type="text" size="20"  maxlength="30" name="token" value="<?=$token?>" />
            <font color="gray" face="courier new">字符限制：[a-z0-9\.\-_]{4,20}，例如：goods.add</font></td>
          </tr>
          <tr>
            <td>排序</td>
            <td><input type="text" size="5"  maxlength="5" name="sort_order" value="<?=$sort_order?>" /></td>
          </tr>
        </table>
      </form>
    </div>
</div>
<?=View::factory('admin/common/footer')?>
<script type="text/javascript">
$().ready(function(){
    $('#system').addClass('selected');
});
</script>